<form action='index.php?app=site&ctl=admin_menu&act=add&step=3' method="GET" class="tableform">
  <div class="division">
    <table width="100%" border="0" class="addmenu" cellpadding="0" cellspacing="0" >
      <{if $menus }>
      <{foreach from=$menus item=item name='item'}>
      <tr>
        <th > <{$item.title}>：</th>
        <td ><{foreach from=$item.allow item=allow name='allow'}>
          
          <a href="javascript:void(0);" class="">
            <input type="radio" name='module'  value='<{$item.app}>:<{$item.ctl}>:<{$allow.act}>' style="display:none">
            <{$allow.title}></a>
          <{/foreach}> </td>

      </tr>
      <{/foreach}>
      <{/if}>
    </table>
  </div>
  <div class="table-action"> <{ button type="submit" id="menubtn" class="btn" label=$___a="下一步"|t:'site'}> </div>
</form>
<script>
	$('menubtn').addEvent('click',function(e){
		var bool=this.form.getElements('input').some(function(el){return el.checked;});	
		if(!bool)MessageBox.error('<{t}>请选择一项<{/t}>');
		return bool; 
	});	
	(function(){
		var _form = $('menubtn').getParent('form'), cur, cls= 'current';
		$ES('a',_form).addEvent('click',function(){
			if(!this.hasClass(cls)){
				this.addClass(cls).getElement('input').checked=true;	
				if(cur = _form.retrieve('cur'))cur.removeClass(cls);	
				_form.store('cur',this);
			}else{
				this.removeClass(cls);	
				_form.store('cur',false);
			}
		});
	})();
</script> 
